export enum DataSourceType {
  MySQL = "MySQL",
  PostgreSQL = "PostgreSQL",
  MongoDB = "MongoDB",
  Redis = "Redis",
  ElasticSearch = "ElasticSearch",
}

export enum DataSourceStatus {
  Disconnected = 0,
  Connected = 1,
  Error = 2,
}

export interface DataSource {
  id?: number;
  name: string;
  type: DataSourceType;
  host: string;
  port: number;
  username: string;
  password: string;
  database: string;
  status: DataSourceStatus;
  testing?: boolean;
  createdAt?: string;
  updatedAt?: string;
}

export interface DataSourceQuery {
  keyword?: string;
  page: number;
  pageSize: number;
}

export interface DataSourceResponse {
  list: DataSource[];
  total: number;
}
